package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import lombok.Data;

/**
 * @desc HighRiseObjScheduleDto
 * @使用场景
 */
@Data
public class HighRiseObjScheduleDto extends BaseDto implements Serializable {

  /**
   * 指标ID
   */
  @ApiModelProperty("指标ID")
  private String objectiveId;

  /**
   * 指标标识
   */
  @ApiModelProperty("指标标识")
  private String objectiveCode;

  /**
   * 是否末级指标 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否末级指标")
  private String isLastObjective;

  /**
   * 冗余目标ID
   */
  @ApiModelProperty("冗余目标ID")
  private String targetId;

  /**
   * 指标编号
   */
  @ApiModelProperty("指标编号")
  private String objectiveNumber;

  /**
   * 指标名称
   */
  @ApiModelProperty("指标名称")
  private String objectiveName;

  /**
   * 指标简称
   */
  @ApiModelProperty("指标简称")
  private String objectiveShortName;

  /**
   * 排序
   */
  @ApiModelProperty("排序")
  private Long orderNumber;

  /**
   * 部门排序
   */
  @ApiModelProperty("部门排序")
  private Long dutyBodyOrderNum;

  /**
   * 个人排序
   */
  @ApiModelProperty("个人排序")
  private Long personalOrderNumber;

  /**
   * 权重排序
   */
  @ApiModelProperty("权重排序")
  private Long weightOrderNumber;

  /**
   * 创建时间
   */
  @ApiModelProperty("创建时间")
  private Date createTime;

  /**
   * 操作时间
   */
  @ApiModelProperty("操作时间")
  private Date operateTime;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    HighRiseObjScheduleDto that = (HighRiseObjScheduleDto) o;
    return (
      objectiveId == that.objectiveId &&
      objectiveCode == that.objectiveCode &&
      isLastObjective == that.isLastObjective &&
      targetId == that.targetId &&
      objectiveNumber == that.objectiveNumber &&
      objectiveName == that.objectiveName &&
      objectiveShortName == that.objectiveShortName &&
      orderNumber == that.orderNumber &&
      dutyBodyOrderNum == that.dutyBodyOrderNum &&
      personalOrderNumber == that.personalOrderNumber &&
      weightOrderNumber == that.weightOrderNumber &&
      createTime == that.createTime &&
      operateTime == that.operateTime
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      objectiveId,
      objectiveCode,
      isLastObjective,
      targetId,
      objectiveNumber,
      objectiveName,
      objectiveShortName,
      orderNumber,
      dutyBodyOrderNum,
      personalOrderNumber,
      weightOrderNumber,
      createTime,
      operateTime
    );
  }

}
